//
//  ZPZNetRequest+MealsList.m
//  项目2网络封装
//
//  Created by rimi on 16/7/22.
//  Copyright © 2016年 周伦. All rights reserved.
//

#import "ZPZNetRequest+MealsList.h"
#import "LStringUtils.h"

@implementation ZPZNetRequest (MealsList)

+(void)getMealsListPageSize:(NSString *)pageSize
                    PageNum:(NSString *)pageNum
                     UserId:(NSString *)userId
                  comletion:(ZLReqComletion )comletion{
    NSMutableDictionary *numDic = [[NSMutableDictionary alloc]init];
    if (![LStringUtils isTextEmpty:pageSize]) {
        [numDic setObject:pageSize forKey:@"pageSize"];
    }
    if (![LStringUtils isTextEmpty:pageNum]) {
        [numDic setObject:pageNum forKey:@"pageNum"];
    }
    if (![LStringUtils isTextEmpty:userId]) {
        [numDic setObject:userId forKey:@"userId"];
    }

    NSDictionary *resultDic = [NSDictionary dictionaryWithDictionary:[self getParametersPaeames:numDic]];
    [self sendRequestByParameters:resultDic Method:@"appAbroad/getMealsList" requestType:ZLApRequestPost Comletion:comletion];
}

+ (void)getVideoComletion:(ZLReqComletion)comletion{
    [self sendRequestByParameters:nil Method:@"video/getVideo" requestType:ZLApRequestPost Comletion:comletion];
    
}

+ (void)getAllProductsListKeywords:(NSString *)keywords UserId:(NSString *)userId comletion:(ZLReqComletion)comletion{
    NSMutableDictionary *numDic = [[NSMutableDictionary alloc]init];
    if (keywords != nil && userId != nil) {
        [numDic setObject:keywords forKey:@"keywords"];
        [numDic setObject:userId forKey:@"userId"];
    }
    NSDictionary *resultDic = [NSDictionary dictionaryWithDictionary:[self getParametersPaeames:numDic]];
    [self sendRequestByParameters:resultDic Method:@"appPickList/getAllProductsList" requestType:ZLApRequestPost Comletion:comletion];
}

+(void)getAdviceListPageSize:(NSString *)pageSize PageNum:(NSString *)pageNum byTitle:(NSString *)byTitle byKeywords:(NSString *)byKeywords comletion:(ZLReqComletion)comletion{
    
    NSMutableDictionary *numDic = [[NSMutableDictionary alloc]init];
    if (![LStringUtils isTextEmpty:pageSize]) {
        [numDic setObject:pageSize forKey:@"pageSize"];
    }
    if (![LStringUtils isTextEmpty:pageNum]) {
        [numDic setObject:pageNum forKey:@"pageNum"];
    }
    if (![LStringUtils isTextEmpty:byTitle]) {
        [numDic setObject:byTitle forKey:@"byTitle"];
    }
    if (![LStringUtils isTextEmpty:byKeywords]) {
        [numDic setObject:byKeywords forKey:@"byKeywords"];
    }
    
    NSDictionary *resultDic = [NSDictionary dictionaryWithDictionary:[self getParametersPaeames:numDic]];
    [self sendRequestByParameters:resultDic Method:@"appAbroad/getPolicyAdviceList" requestType:ZLApRequestPost Comletion:comletion];
}



@end
